<!DOCTYPE html>
<html>
  <head>
    <title>Listing 4.7</title>
    <script type="text/javascript" src="../scripts/assert.js"></script>
    <link href="../styles/assert.css" rel="stylesheet" type="text/css">
  </head>

  <body>
    <script type="text/javascript">

      var ninja = {
        chirp: function(n) {                              //#1
          return n > 1 ? arguments.callee(n - 1) + "-chirp" : "chirp";
        }
      };

      assert(ninja.chirp(3) == "chirp-chirp-chirp",      //#2
             "arguments.callee is the function itself.");

    </script>
  </body>
</html>
